package com.shenmazong;

import java.lang.reflect.Method;

/**
 * @author 田不平
 * @project server-security
 * @date 2020/5/15 8:19 AM
 * http://www.shenmazong.com
 */
public class AppReflection {

    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException {
        Class c1 = Class.forName("com.shenmazong.TbUser");
        System.out.println(c1);

        Method msg = c1.getDeclaredMethod("msg", null);


    }
}

class TbUser {
    public Integer id;
    private String name;

    public Integer add(int a, int b) {
        return (a+b);
    }

    private String msg() {
        return "i am tbuser";
    }
}
